/*
RNAvigator is a tool for visualizing secondary structure of RNA
Copyright 2012 Elias La Cour & Peter Bertelsen

This file is part of RNAvigator.

RNAvigator is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

RNAvigator is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with RNAvigator.  If not, see <http://www.gnu.org/licenses/>.
*/

package rnavigator.model;

public class Knot {

    private int pos1, pos2;
    private boolean pseudoKnot = false;
    private UnitCircleArc arc = new UnitCircleArc();

    Knot() {
    }

    Knot(int pos1) {
        this.pos1 = pos1;
    }

    public Knot(int pos1, int pos2) {
        this.pos1 = pos1;
        this.pos2 = pos2;
    }

    public Knot(int pos1, int pos2, boolean pseudoKnot) {
        this(pos1, pos2);
        this.pseudoKnot = pseudoKnot;
    }

    /**
     * @return the pos1
     */
    public int getPos1() {
        return pos1;
    }

    /**
     * @param pos1 the pos1 to set
     */
    public void setPos1(int pos1) {
        this.pos1 = pos1;
    }

    /**
     * @return the pos2
     */
    public int getPos2() {
        return pos2;
    }

    /**
     * @param pos2 the pos2 to set
     */
    public void setPos2(int pos2) {
        this.pos2 = pos2;
    }

    /**
     * @return the pseudoKnot
     */
    public boolean isPseudoKnot() {
        return pseudoKnot;
    }

    /**
     * @param pseudoKnot the pseudoKnot to set
     */
    public void setPseudoKnot(boolean pseudoKnot) {
        this.pseudoKnot = pseudoKnot;
    }

    @Override
    public String toString() {
        String str = ("knot - p1: " + pos1 + " p2: " + pos2 + " isPseudoKnot: " + pseudoKnot);
        return str;
    }

    /**
     * @return the arc
     */
    public UnitCircleArc getUCArc() {
        return arc;
    }

    /**
     * @param arc the arc to set
     */
    public void setUCArc(UnitCircleArc arc) {
        this.arc = arc;
    }
}